package org.loofer.baseframe.utils;


/**
 * 
 * @author Administrator
 *
 * @param <V> V extends BaseEmptyView泛型接口，同时extends BaseEmptyView限制了返回的T类型必须是BaseEmptyView的子类
 * @param <T>
 */
public abstract class BaseMVPActivity<V extends BaseEmptyView,T extends BasePresenter<V>> extends BaseActivity{

    public T presenter;

    @Override
    public void onbind() {
        presenter = initPresenter();
        presenter.bindView((V) this);
    }

    @Override
    public void unbind() {
        presenter.unbindView();
    }

    //实例化presenter
    public abstract T initPresenter();

}
